#pragma once
#include <myFs/fscomponent.h>
#include <string>
#include <vector>
namespace myFs {
namespace basic {
struct FSinterface {
    using size_t                                                                         = std::uint32_t;
    FSinterface()                                                                        = default;
    virtual ~FSinterface()                                                               = default;
    virtual int open(std::string const& path)                                            = 0;
    virtual int readdir(std::string const& path, std::vector<DirEntry>& dir)             = 0;
    virtual int write(std::string const& path, char const* buf, size_t size, size_t off) = 0;
    virtual int read(std::string const& path, char* buf, size_t size, size_t off)        = 0;
    virtual int rename(std::string const& path1, std::string const& path2)               = 0;
    virtual int rmdir(std::string const& path)                                           = 0;
    virtual int mkdir(std::string const& path)                                           = 0;
    virtual int mknod(std::string const& path)                                           = 0;
    virtual int getattr(std::string const& path, Inode& stat)                            = 0;
    virtual int unlink(std::string const& path)                                          = 0;
    virtual int releasedir(std::string const& path)                                      = 0;
};

}  // namespace basic

}  // namespace myFs